{% assign id = include.path | replace: '{', '' | replace: '}', '' %}

<div class="doc endpoint" data-href="{{ id }}_{{ include.name }}" >



    <div class="info">
        <h2 class="title">
            <span class="method-{{ include.name }}" data-after="{{ include.name }}">
                {{ include.path }}
            </span>
        </h2>
        <p class="summary">{{ include.method.summary }}</p>
        <article class="markdown">
            {{ include.method.description | newline_to_br| markdownify }}
        </article>

        {% capture fileName %}{{ include.path }}_{{ include.name }}{% endcapture %}
        {% assign fileNameStripped = fileName | replace_first: '/', ''|replace: '/', '_' | replace: '{', ''| replace: '}', ''%}

        {% for collection in site.collections %}
            {% assign docs = collection.docs %}
            {% for doc in docs %}
                {% if doc.collection == "api" and doc.slug ==  fileNameStripped%}
                    {{ doc.content }}
                {% endif %}
            {% endfor %}
        {% endfor %}


        {% assign parameters = include.method.parameters %}
        {% include parameters.html data=parameters %}
    </div>
    {% include preview.html method=include.method %}
</div>
